<template>
  <div>
    <el-header>欢迎使用惊喜一餐！</el-header>
    <el-main>
      <el-card>
        <h2>推荐餐厅</h2>
        <ul>
          <li v-for="restaurant in recommendedRestaurants" :key="restaurant.id">
            {{ restaurant.name }}
          </li>
        </ul>
      </el-card>
      <el-button @click="$router.push('/restaurants')">餐厅列表</el-button>
      <el-button @click="$router.push('/user')">用户信息</el-button>
    </el-main>
  </div>
</template>

<script setup>
import {ref} from 'vue';


const recommendedRestaurants = ref([
  {id: 1, name: '哈哈餐厅1'},
  {id: 2, name: '高评分餐厅2'}
])
</script>